package com.sun.androidexerciseproject.widget.activity.ui;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.AppCompatButton;
import android.view.View;

import com.sun.androidexerciseproject.widget.R;

public class LinearLayoutActivity extends AppCompatActivity {
    AppCompatButton mAppCompatButtonLL;
    AppCompatButton mAppCompatButtonRL;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_liner_layout);
        initWidget();
    }

    private void initWidget() {
        mAppCompatButtonLL = (AppCompatButton) findViewById(R.id.btn_ll_percent);
        mAppCompatButtonRL = (AppCompatButton) findViewById(R.id.btn_rl_percent);
        mAppCompatButtonLL.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(LinearLayoutActivity.this, PercentFrameLayoutActivity.class));
            }
        });
        mAppCompatButtonRL.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(LinearLayoutActivity.this, PercentRelativeLayoutActivity.class));
            }
        });

    }
}
